home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / windows / tpwin31.zip / LZEXPAND.PAS < prev    next >
Pascal/Delphi Source File  |  1992-04-06  |  2KB  |  61 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {       Turbo Pascal for Windows Run-time Library       }
  5. {       Windows 3.1 API Interface Unit                  }
  6. {                                                       }
  7. {       Copyright (c) 1992 Borland International        }
  8. {                                                       }
  9. {*******************************************************}
  10.  
  11. unit LZExpand;
  12.  
  13. interface
  14.  
  15. uses WinTypes;
  16.  
  17. { Constants }
  18.  
  19. const
  20. { Error Return Codes }
  21.  
  22.   lzerror_BadInHandle = -1;            { invalid input handle }
  23.   lzerror_BadOutHandle = -2;           { invalid output handle }
  24.   lzerror_Read = -3;                   { corrupt compressed file format }
  25.   lzerror_Write = -4;                  { out of space for output file }
  26.   lzerror_GlobAlloc = -5;              { insufficient memory for LZFile struct }
  27.   lzerror_GlobLock = -6;               { bad global handle }
  28.   lzerror_BadValue = -7;               { input parameter out of acceptable range }
  29.   lzerror_UnknownAlg = -8;             { compression algorithm not recognized }
  30.  
  31. { Prototypes }
  32.  
  33. function LZStart: Integer;
  34. procedure LZDone;
  35. function CopyLZFile(Source, Dest: Integer): Longint;
  36.  
  37. function LZCopy(Source, Dest: Integer): Longint;
  38. function LZInit(Source: Integer): Integer;
  39. function GetExpandedName(Source, Buffer: PChar): Integer;
  40. function LZOpenFile(FileName: PChar; var ReOpenBuf: TOFStruct;
  41.   Style: Word): Integer;
  42. function LZSeek(LZFile: Integer; SeekTo: Longint; Mode: Integer): Longint;
  43. function LZRead(LZFile: Integer; Buf: PChar; Count: Integer): Integer;
  44. procedure LZClose(LZFile: Integer);
  45.  
  46. implementation
  47.  
  48. function LZStart;                          external 'LZEXPAND' index 7;
  49. procedure LZDone;                          external 'LZEXPAND' index 9;
  50. function CopyLZFile;                       external 'LZEXPAND' index 8;
  51. function LZCopy;                           external 'LZEXPAND' index 1;
  52. function LZInit;                           external 'LZEXPAND' index 3;
  53. function LZSeek;                           external 'LZEXPAND' index 4;
  54. function LZRead;                           external 'LZEXPAND' index 5;
  55. procedure LZClose;                         external 'LZEXPAND' index 6;
  56. function GetExpandedName;                  external 'LZEXPAND' index 10;
  57. function LZOpenFile;                       external 'LZEXPAND' index 2;
  58.  
  59. end.
  60.  
  61.